#!/usr/bin/perl -w
sub sred_ar {
my $num = 0;
my $arif = 0;
my $end = $#_+1;
foreach (@_) {
$num += $_;
 }
$arif = $num / $end;
return $arif;
}

sub my_num {
foreach (@array) {
 if ($_>$ar) {
  print "$_ larger then sred arif \n";
  } 
 }
} 
print "Enter some numbers on separate lines \n";
@array = <STDIN>;
$ar = &sred_ar (@array);
print "sred arif is $ar \n";

&my_num (@array);
